package top.infopub.mgr.bpa.service.impl;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.bpa.dao.SubpackEntryDao;
import top.infopub.mgr.bpa.domain.SubpackEntryDomain;
import top.infopub.mgr.bpa.service.SubpackEntryService;
import top.infopub.mgr.bpa.vo.SubpackEntryVo;
import top.infopub.model.bpa.SubpackEntry;

import java.text.ParseException;


@Service
public class SubpackEntryServiceImpl extends GenericServiceImpl<SubpackEntry, String> implements SubpackEntryService {

    @Autowired
    private SubpackEntryDao subpackEntryDao;


    @Override
    public GenericDao<SubpackEntry, String> getDao() {
        return subpackEntryDao;
    }


    @Override
    public Page<SubpackEntryDomain> selectByDomainWhere(Page<SubpackEntryDomain> page,
                                                        SubpackEntryVo subpackEntryVo) throws ParseException {
        PageHelper.startPage(page.getPageNum(), page.getPageSize());
        return (Page<SubpackEntryDomain>)subpackEntryDao.selectByDomainWhere(subpackEntryVo);
    }

}